import type { FormSchema } from '@/components/core/schema-form/';

export const useActionTempSchema = (): FormSchema<API.AddActionTempParams>[] => [
  {
    field: 'ACTION_TEMP_NO',
    component: 'Input',
    label: '模版编号',
    rules: [{ required: true, type: 'string' }],
  },
  {
    field: 'ACTION_TEMP_NAME',
    component: 'Input',
    label: '模版名称',
    rules: [{ required: true, type: 'string' }],
  },
  {
    field: 'ACTION_TEMP_TYPE',
    component: 'RadioGroup',
    label: '模版类型',
    defaultValue: 2,
    rules: [{ required: false, type: 'number' }],
    componentProps: {
      options: [
        {
          label: '自定义',
          value: 0,
        },
        {
          label: '系统内置',
          value: 1,
        },
        {
          label: '用户新增',
          value: 2,
        },
      ],
    },
  },
  {
    field: 'ACTION_TEMP_STATE',
    component: 'RadioGroup',
    label: '模版状态',
    defaultValue: 1,
    rules: [{ required: false, type: 'number' }],
    componentProps: {
      options: [
        {
          label: '不可用',
          value: 0,
        },
        {
          label: '可用',
          value: 1,
        },
        {
            label: '已删除',
            value: 2,
          },
      ],
    },
  },
  {
    field: 'ACTION_TEMP_REMARKS',
    component: 'InputTextArea',
    label: '备注'
  },
];
